﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YuFeng.Web.Extentions
{
    /// <summary>
    /// json数据模版
    /// </summary>
    internal class JsonTemplate
    {
        /// <summary>
        /// 菜单创建-click
        /// </summary>
        internal const string MenuClick = @"{""type"":""[type]"",""name"":""[name]"",""key"":""[key]""}";
        /// <summary>
        /// 菜单创建-view
        /// </summary>
        internal const string MenuView = @"{""type"":""[type]"",""name"":""[name]"",""url"":""[url]""}";

        /// <summary>
        /// 模板消息
        /// </summary>
        internal const string Template = @"{""touser"":""[touser]"",""template_id"":""[template_id]"",""url"":""[url]"",""topcolor"":""[topcolor]"",""data"":{[data]}}";
        /// <summary>
        /// 模板消息-内容部分
        /// </summary>
        internal const string TemplateData = @"""[key]"":{""value"":""[value]"",""color"":""[color]""}";

        /// <summary>
        /// 设置用户备注名
        /// </summary>
        internal const string UpdateUserRemark = @"{""openid"":""[openid]"",""remark"":""[remark]""}";

        /// <summary>
        /// 创建分组
        /// </summary>
        internal const string CreateGropus = @"{""group"":{""name"":""[name]""}}";
        /// <summary>
        /// 修改分组名
        /// </summary>
        internal const string UpdateGroups = @"{""group"":{""id"":[id],""name"":""[name]""}}";
        /// <summary>
        /// 移动用户分组
        /// </summary>
        internal const string UpdateUserGroups = @"{""openid"":""[openid]"",""to_groupid"":[to_groupid]}";


        /// <summary>
        /// 上传图文消息素材
        /// </summary>
        internal const string UploadNewsMedia = @"{""thumb_media_id"":""[thumb_media_id]"",""author"":""[author]"",""title"":""[title]"",""content_source_url"":""[content_source_url]"",""content"":""[content]"",""digest"":""[digest]"",""show_cover_pic"":""[show_cover_pic]""}";

        /// <summary>
        /// 生成二维码-临时
        /// </summary>
        internal const string QrcodeQR_SCENE = @"{""expire_seconds"": [expire_seconds], ""action_name"": ""[action_name]"", ""action_info"": {""scene"": {""scene_id"": [scene_id]}}}";
        /// <summary>
        /// 生成二维码-永久
        /// </summary>
        internal const string QrcodeQR_LIMIT_SCENE = @"{""action_name"": ""[action_name]"", ""action_info"": {""scene"": {""scene_id"": [scene_id]}}}";

        /// <summary>
        /// 根据分组进行推送消息-媒体
        /// </summary>
        internal const string MassGuoupsMedia = @"{""filter"":{""is_to_all"":[is_to_all],""group_id"":""[group_id]""},""[msgtype]"":{""media_id"":""[media_id]""},""msgtype"":""[msgtype]""}";
        /// <summary>
        /// 根据分组进行推送消息-文本
        /// </summary>
        internal const string MassGuoupsText = @"{""filter"":{""is_to_all"":[is_to_all],""group_id"":""[group_id]""},""[msgtype]"":{""content"":""[content]""},""msgtype"":""[msgtype]""}";
        /// <summary>
        /// 根据OpenID列表进行推送消息-媒体
        /// </summary>
        internal const string MassOpenidsMedia = @"{""touser"":[[touser]],""[msgtype]"":{""media_id"":""[media_id]""},""msgtype"":""[msgtype]""}";
        /// <summary>
        /// 根据OpenID列表进行推送消息-文本
        /// </summary>
        internal const string MassOpenidsText = @"{""action_name"": ""[action_name]"", ""action_info"": {""scene"": {""scene_id"": [scene_id]}}}";
        /// <summary>
        /// 群发预览接口-媒体
        /// </summary>
        internal const string MassSendPreviewMedia = @"{""touser"":""[touser]"",""[msgtype]"":{""media_id"":""[media_id]""},""msgtype"":""[msgtype]""}";
        /// <summary>
        /// 群发预览接口-文本
        /// </summary>
        internal const string MassSendPreviewText = @"{""touser"":""[touser]"",""[msgtype]"":{""content"":""[content]""},""msgtype"":""[msgtype]""}";

        /// <summary>
        /// 将一条长链接转成短链接
        /// </summary>
        internal const string ShortUrl = @"{""action"":""long2short"",""long_url"":""[long_url]""}";
    }
}
